package com.mapull.primitive;

/**
 * @author Mapull
 * @date 2024-04-17
 */
public class SimpleCharacter {

    public static void main(String[] args) {
        char c1 = Character.toUpperCase('r');
        char c2 = Character.toUpperCase('B');
        char c3 = Character.toUpperCase('8');
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
    }

    public static void main19(String[] args) {
        char c1 = Character.toLowerCase('M');
        char c2 = Character.toLowerCase('h');
        char c3 = Character.toLowerCase('6');
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
    }

    public static void main18(String[] args) {
        boolean b1 = Character.isUpperCase('M');
        boolean b2 = Character.isUpperCase('a');
        boolean b3 = Character.isUpperCase('5');
        System.out.println(b1);
        System.out.println(b2);
        System.out.println(b3);
    }
    public static void main17(String[] args) {
        // get unicode codepoint
        int five = Character.codePointAt("5", 0);
        int kg = Character.codePointAt("K", 0);
        System.out.println(five);
        System.out.println(kg);

        boolean b1 = Character.isLetter(53);
        boolean b2 = Character.isLetter(75);
        System.out.println(b1);
        System.out.println(b2);
    }
    public static void main16(String[] args) {
        boolean b1 = Character.isLetter('5');
        boolean b2 = Character.isLetter('K');
        System.out.println(b1);
        System.out.println(b2);
    }
    public static void main15(String[] args) {
        boolean b1 = Character.isDigit(55);
        boolean b2 = Character.isDigit(77);
        System.out.println(b1);
        System.out.println(b2);
    }

    public static void main14(String[] args) {
        boolean b1 = Character.isDigit('5');
        boolean b2 = Character.isDigit('K');
        System.out.println(b1);
        System.out.println(b2);
    }
    public static void main13(String[] args) {
        boolean a = Character.isDefined(12);
        boolean b = Character.isDefined(123456);
        System.out.println("12 is defined " + a);
        System.out.println("123456 is defined " + b);
    }
    public static void main12(String[] args) {
        Character c1 = Character.valueOf('1');
        Character c2 = Character.valueOf('1');
        Character c3 = Character.valueOf('王');
        Character c4 = Character.valueOf('王');
        System.out.println(c1.equals(c2) + " " + (c1 == c2));
        System.out.println(c3.equals(c4) + " " + (c3 == c4));
    }
    public static void main11(String[] args) {
        Character c1 = Character.valueOf('1');
        Character c2 = Character.valueOf('A');
        Character c3 = Character.valueOf('王');
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
    }
    public static void main10(String[] args) {
        boolean bool1 = Character.isDefined('A');
        boolean bool2 = Character.isDefined('我');
        boolean bool3 = Character.isDefined('#');
        boolean bool4 = Character.isDefined('\uFFFF');
        System.out.println(bool1);
        System.out.println(bool2);
        System.out.println(bool3);
        System.out.println(bool4);
    }

    public static void main9(String[] args) {
        int i1 = Character.getNumericValue(1);
        int i2 = Character.getNumericValue(89);
        int i3 = Character.getNumericValue(123);
        System.out.println(i1);
        System.out.println(i2);
        System.out.println(i3);
    }
    public static void main8(String[] args) {
        int i1 = Character.getNumericValue('A');
        int i2 = Character.getNumericValue('1');
        int i3 = Character.getNumericValue('好');
        int i4 = Character.getNumericValue('\u00BC');
        System.out.println(i1);
        System.out.println(i2);
        System.out.println(i3);
        System.out.println(i4);
    }
    public static void main7(String[] args) {
        Character ch = Character.valueOf('A');
        char c = ch.charValue();
        System.out.println(ch);
        System.out.println(c);
    }

    public static void main6(String[] args) {
        byte b1 = Character.UNASSIGNED; // 0
        byte b2 = Character.UPPERCASE_LETTER;// 1
        byte b3 = Character.LOWERCASE_LETTER;// 2
        byte b4 = Character.TITLECASE_LETTER;// 3
        byte b5 = Character.MODIFIER_LETTER;// 4
        byte b6 = Character.OTHER_LETTER;// 5
        byte b7 = Character.FINAL_QUOTE_PUNCTUATION;// 30
        byte b8 = Character.DIRECTIONALITY_UNDEFINED;// -1
    }
    public static void main5(String[] args) {
        Character c1 = new Character('1');
        Character c2 = Character.valueOf('1');
        Character c3 = Character.valueOf('A');
        boolean bool1 = c1.equals(c2);
        boolean bool2 = c1.equals(c3);
        System.out.println(bool1);
        System.out.println(bool2);
    }
    public static void main4(String[] args) {
        Character c1 = new Character('1');
        Character c2 = Character.valueOf('A');
        Character c3 = Character.valueOf('9');
        int compare12 = c1.compareTo(c2);
        int compare13 = c1.compareTo(c3);
        int compare31 = c3.compareTo(c1);
        System.out.println(compare12);
        System.out.println(compare13);
        System.out.println(compare31);
    }

    public static void main3(String[] args) {
        int b1 = Character.BYTES;
        char b2 = Character.MIN_VALUE;
        char b3 = Character.MAX_VALUE;
        int b4 = Character.SIZE;

        System.out.println(b1);
        System.out.println(b2);
        System.out.println(b3);
        System.out.println(b4);
    }

    public static void main2(String[] args) {
        Character c1 = new Character('\u0036');
        Character c2 = new Character('\u2103');
        Character c3 = new Character('\u231B');
        Character c4 = new Character('\u4EAE');
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c4);
    }
    public static void main1(String[] args) {
        Character c1 = new Character('1');
        Character c2 = new Character('A');
        Character c3 = new Character('码');
        Character c4 = new Character('?');
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c4);
    }
}
